<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
[#include "/admin/include/head.htm"]
    <style type="">
        .imagePreview {
            background-color: red;
            color: white;
        }
    </style>
    <script type="text/javascript">
        var grid;
        function f_export_loan(){
            $("#exportForm").submit();
        }
        function f_verify(id){
            top.f_addTab(null, '充值审核', base+'/admin/recharge/'+id+'.aspx');
        }
        $(function(){
            grid = $("#maingrid").ligerGrid({
                columns: [
                    {hide: true, name: 'path'},
                    {display: '种类', name: 'type', align: 'center', width: 200 ,dict:"recharge_methods"},
                    {display: '支付方式', name: 'ap_name', align: 'center', width: 100 },
                    {display: '用户ID', name: 'user_id', align: 'center', width: 120 },
                    {display: '用户名称', name: 'u_user_name', align: 'center', width: 100 },
                    {display: '真实姓名', name: 'ra_real_name', align: 'center', width: 100 },
                    {display: '流水号', name: 'trade_no', align: 'center', width: 100},
                    {display: '金额', name: 'money', align: 'center', width: 100 },
                    {display: '充值时间', name: 'addtime', align: 'center', width: 100,isdate:"true" },
                    {display: 'status', name: 'status', align: 'center', width: 0 ,frozen: true},
                    {display: 'id', name: 'id', align: 'center', width: 0 ,frozen: true},
                    {display: 'ap_style', name: 'ap_style', align: 'center', width: 0 ,frozen: true},
                    {display: '充值状态', name: 'status', align: 'center', width: 100,
                        render: function(row){
                            if(row.status==0){
                                if(row.ap_style==0){
                                    var html = '<input value="审核" type="button" onclick="f_verify('+row.id+')">';
                                    return html;
                                }else{
                                    return "未付款";
                                }
                            }else if(row.status==1){
                                return "充值成功";
                            }else{

                                return "充值失败";
                            }
                        }
                    },
                    {display: '备注', name: 'remark', align: 'center', width: 100 }
                ],  pageSize:20, url: 'queryData.aspx?borrowId=${borrowId}',toolbar: {}, width: '100%', height:'100%', enabledSort: true
            });

            $(".l-toolbar").ligerToolBar({ items: [

                { text: '导出', click: f_export_loan }
            ]
            });
            //绑定搜索按钮
            LG.search(grid);
        });

    </script>
</head>
<body style="padding:10px; overflow:hidden;">
<div id="functions">
    <div class="clearfix">
        <div style="float:left;">
            <form id="exportForm" method="post" action="${path}/admin/recharge/exportRechargeList.aspx">
                 <span>
					充值方式:[@u.select listKey="dict_value"  headerKey="" headerValue="全部类型" listValue="dict_lab" headerButtom="false" list=DictionaryUtils.getDictListNid('recharge_methods')
                 name="rechargeType"  /]
			</span>
             <span>
                支付方式:[@u.select list={"":"全部类型","1":"工商银行","2":"建设银行","4":"后台充值"}
             name="payWay" value="${(payWay)!''}" /]
			</span>
            <span>
					充值金额：<input type="text" onkeyup="value=value.replace(/[^(\d)]/g,'')" name="money" />
			</span>
            <span>
					用户名：<input type="text" name="userName" value="${userName }" />
			</span>

             <span>
					订单号：<input type="text" name="trade_no" value="${trade_no }" />
			</span>


             <span>
					状态： [@u.select list={"":"全部","0":"未付款","1":"充值成功","-1":"充值失败"}
             name="status" value="${(status)!''}" /]
			</span>
                日期：<input type="text" id="begin_date" name="begin_date"
                          class="formText WdatePicker {dateFmt:'yyyy-MM-dd'}" />
                -
                <input type="text" id="endDate" name="end_date"
                       class="formText WdatePicker {dateFmt:'yyyy-MM-dd'}" />
                <input type="button" class="button" value="搜索" id="search"/>
                <a href="#" id="search_btn_reset" face="Wingdings 3">清除本次搜索</a>

            </form>
        </div>
    </div>
</div>

<div id="maingrid" style="margin:0; padding:0"></div>
</body>
</html>